-
Notifications
You must be signed in to change notification settings - Fork 217
fix: prioritize boolean cors value over debug flags #1189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@taeold updated as per suggestion and rebased |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - please fix formatting!
Thank you for an awesome contribution!
@taeold anything else I can do? |
@taeold got it now, had to run |
As discussed in firebase/firebase-tools#4862 it's not possible to disable cors in v2 functions, because the emulator enables the debug feature for cors overriding `opts.cors`. If we could prioritize the boolean flag over the debug feature, we could have both: The ability to disable cors and also prioritize the debug flag over user provided configuration.
Co-authored-by: Daniel Lee <taeold@gmail.com>
@stfsy I fixed your merge conflicts but it looks like you need to run |
@colerogers thank you very much 🙂 I ran |
Description
As discussed in firebase/firebase-tools#4862 it's not possible to disable cors in v2 functions when running in the emulator, because the emulator enables the debug feature for cors overriding
opts.cors
.If we could prioritize the boolean flag over the debug feature, we could have both: The ability to disable cors and also prioritize the debug flag over user provided configuration.
Code sample